package com.situ.day5;

public class Student extends Object{
    //属性、成员变量、实例变量
    private int id;
    public String name;
    private int age;
    private String className;
    //静态变量、静态属性
    public static String country = "cn";

    //成员方法、实例方法、非静态方法
    public void show() {
        System.out.println("Student.show");
        print();
        this.name = "lisi";
    }

    //静态方法
    public static void print() {
        System.out.println("Student.print");
        //show();
        //this.name = "lisi";
        //this、super
        test();
    }

    public static void test() {
        System.out.println("Student.test");
    }

    public Student() {
    }

    public Student(int id, String name, int age, String className) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.className = className;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", className='" + className + '\'' +
                '}';
    }
}
